fs: completely ignore unknown open flags
authorChristoph Hellwig <hch@lst.de>
Thu, 27 Apr 2017 07:42:25 +0000 (09:42 +0200)
committerRaspbian kernel package updater <root@raspbian.org>
Sun, 23 Jul 2017 03:07:40 +0000 (03:07 +0000)
commit0a0f8c3304749881bcce6112ca2998041d600070
treee605d0d3ed0679da3802d8c129fc30991fe5884a
parente39cf356b77b5648b19db1addc364fcc65e25b17
fs: completely ignore unknown open flags

commit 629e014bb8349fcf7c1e4df19a842652ece1c945 upstream.

Currently we just stash anything we got into file->f_flags, and the
report it in fcntl(F_GETFD).  This patch just clears out all unknown
flags so that we don't pass them to the fs or report them.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/open.c